package cn.com.zpark.servlet;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;

/**
 * @PackageName: cn.com.zpark.servlet
 * @ClassName: ServletDemo02
 * @Description:
 * @author: RZS
 * @date: 2021/11/8  15:06
 */
// @WebServlet(name = "HttpServlet", urlPatterns = "/sd2.do")
@WebServlet("/sd2.do")
public class ServletDemo02 extends HttpServlet {
    @Override
    protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        PrintWriter writer = response.getWriter();
        writer.write("<h1>Hello  Servlet</h1>");
        System.out.println("请求完成");
    }
}
